/* data.h */

/* these help use use the bit boards in a human readable way */
#define A6 0x20000000 /* 00100000000000000000000000000000 */ 
#define B6 0x10000000 /* 00010000000000000000000000000000 */
#define C6 0x8000000  /* 00001000000000000000000000000000 */
#define D6 0x4000000  /* 00000100000000000000000000000000 */
#define E6 0x2000000  /* 00000010000000000000000000000000 */
#define A5 0x1000000  /* 00000001000000000000000000000000 */
#define B5 0x800000   /* 00000000100000000000000000000000 */
#define C5 0x400000   /* 00000000010000000000000000000000 */
#define D5 0x200000   /* 00000000001000000000000000000000 */
#define E5 0x100000   /* 00000000000100000000000000000000 */
#define A4 0x80000    /* 00000000000010000000000000000000 */
#define B4 0x40000    /* 00000000000001000000000000000000 */
#define C4 0x20000    /* 00000000000000100000000000000000 */
#define D4 0x10000    /* 00000000000000010000000000000000 */
#define E4 0x8000     /* 00000000000000001000000000000000 */
#define A3 0x4000     /* 00000000000000000100000000000000 */
#define B3 0x2000     /* 00000000000000000010000000000000 */
#define C3 0x1000     /* 00000000000000000001000000000000 */
#define D3 0x800      /* 00000000000000000000100000000000 */
#define E3 0x400      /* 00000000000000000000010000000000 */
#define A2 0x200      /* 00000000000000000000001000000000 */
#define B2 0x100      /* 00000000000000000000000100000000 */
#define C2 0x80       /* 00000000000000000000000010000000 */
#define D2 0x40       /* 00000000000000000000000001000000 */
#define E2 0x20       /* 00000000000000000000000000100000 */
#define A1 0x10       /* 00000000000000000000000000010000 */
#define B1 0x8        /* 00000000000000000000000000001000 */
#define C1 0x4        /* 00000000000000000000000000000100 */
#define D1 0x2        /* 00000000000000000000000000000010 */
#define E1 0x1        /* 00000000000000000000000000000001 */

enum COLORS { WHITE, BLACK };
enum PIECES { k, q, b, n, r, p, K, Q, B, N, R, P, BLANK };

/* a note on the unsignedness of integers: It is VERY important that our 
 * integers be unsinged because the C spec is not clear whether logical or
 * arithmetic shift operations be used on signed integers (an implementaitons
 * differ) source: http://en.wikipedia.org/wiki/Bitwise_operation */

// For all intents and purposes this can be thought of as a 'State' class, but 
// for historical reasons it is a struct called board. 
typedef struct
{
  /* black pieces */
  unsigned int k; /* king */
  unsigned int q; /* queen(s) */
  unsigned int b; /* bishop */
  unsigned int n; /* night */
  unsigned int r; /* rook */
  unsigned int p; /* pawn(s) */

  /* white pieces */
  unsigned int K; /* king */
  unsigned int Q; /* queen(s) */
  unsigned int B; /* bishop */
  unsigned int N; /* night */
  unsigned int R; /* rook */
  unsigned int P; /* pawn(s) */

  int score; // !!! IN RELATION TO BLACK !!! 
  COLORS onMove;
  int moveNumber;
} board;

typedef struct
{
	PIECES piece; 
	unsigned int position;
} piece;


